import 'package:flutter/material.dart';

///基准线布局
class EgBaseLine extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text("Baseline 布局"),
      ),
      body: new Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          new Baseline(
            baseline: 80.0,
            baselineType: TextBaseline.alphabetic,
            child: new Text(
              "AaBbCcDd",
              style: TextStyle(fontSize: 18, textBaseline: TextBaseline.alphabetic),
            ),
          ),
          new Baseline(
              baseline: 80.0,
              baselineType: TextBaseline.alphabetic,
              child: new Container(
                width: 40,
                height: 40,
                color: Colors.green,
              )),
          new Baseline(
            baseline: 80,
            baselineType: TextBaseline.alphabetic,
            child: new Text(
              "EeDdFfQq",
              style: new TextStyle(fontSize: 26, textBaseline: TextBaseline.ideographic),
            ),
          )
        ],
      ),
    );
  }
}
